package com.ponhu.ea2.enums;

/**
 * AI接口调用类型枚举
 */
public enum SyncAiDataTypeEnum {

    BAO_XIAO_JIAO(1, "包小检"),
    SHEN_ZHEN(2, "深圳公司接口"),
    WANBIAO_HOME(3, "腕表之家"),
    ;

    private Integer code;

    private String name;

    SyncAiDataTypeEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getName(Integer code) {
        if (code == null) return null;
        for (SyncAiDataTypeEnum c : SyncAiDataTypeEnum.values()) {
            if (code.equals(c.getCode())) {
                return c.name;
            }
        }
        return null;
    }

}
